% V20210224 - 11.8 Dialog transitions INCLUDE "GW.bas" % Create transition array. ARRAY.LOAD transition$[], "fade", "flip", "flow", "none", "pop", "slide", "slidedown", "slidefade", "slideup", "turn" % Create a new page. p = GW_NEW_PAGE() % Create a titlebar title and button. title$ = GW_ADD_BAR_TITLE$("Dialog Transitions Demo") GW_USE_THEME_CUSTO_ONCE("notext icon=power") rbtn$ = GW_ADD_BAR_RBUTTON$(">BACK") % Add the titlebar to the page. GW_ADD_TITLEBAR(p, title$ + rbtn$) % Add a textbox. GW_ADD_TEXTBOX(p, "Tap one of the 10 buttons to open a dialog with the corresponding transition:") % Create 10 dialogs, one per transition. % And 10 buttons to open them. ARRAY.LOAD ok$[], "Ok" DIM dialog[10] GW_START_CENTER(p) FOR i = 1 TO 10 e$ = "Transition for opening/closing is: "+transition$[i] dialog[i] = GW_ADD_DIALOG_MESSAGE(p, "Dialog Message", e$, ok$[]) GW_SET_TRANSITION(dialog[i], transition$[i]) GW_USE_THEME_CUSTO_ONCE("inline") GW_ADD_BUTTON(p, transition$[i], GW_SHOW_DIALOG$(dialog[i])) NEXT GW_STOP_CENTER(p) % Render the page. GW_RENDER(p) % Handle user input. DO r$ = GW_WAIT_ACTION$() % Place here any necessary code to process user actions. % Leave when the user hit the Back key. UNTIL r$ = "BACK" END "End of Dialog Transitions Demo"